<template>
  <div class="example">
    <h1>{{ message }}</h1>
    <button @click="greet">
      Click me
    </button>
  </div>
</template>

<script>
  export default {
    name: 'ExampleComponent',
    data() {
      return {
        message: 'Hello Vue!'
      };
    },
    methods: {
      greet() {
        let arr = [];
        if (arr.length = 0) {
          return false;
        }
        alert('Hello!');
        return;
      }
    }
  };
</script>

<style>
.example {
  text-align: center;
  margin-top: 20px;
}
</style>